package com.atguigu.spring5.aopanno;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestAop {
    @Test
    public void testAopAnno(){
        ApplicationContext context = new ClassPathXmlApplicationContext("bean10.xml");
        User user = context.getBean("user", User.class);
        // 执行被增强类的方法，增强方法会自动运行
        user.add();

    }
}
